package universityModel.person;

/**
 *
 * @author Parkhomenko Dmytro
 */

public class Student extends Person implements Comparable<Student>, StudentInterface {
	private StudentInfo studentInfo;
	private StudyPlace studyPlace;
	private double studRanking;
	private int knowledges;
	
	public Student(Name name,
                   BiographicalData biographicalData,
                   StudentInfo studentInfo,
                   StudyPlace studyPlace) {
		
		super(name, biographicalData);
		
                this.studentInfo = studentInfo;
		this.studyPlace = studyPlace;
                
                learningProcess = new ComputerWork();
	}
	
	public String getNameGroup() {
		return  studentInfo.getGroup();
	}
	
        @Override
	public String getProffesionalDescription() {
		return studyPlace +
                       "\nStudent information:" + 
                       studentInfo;
	}
	
	public double getStudentRanking() {
		return studRanking;
	}
	
	public void setStudentRanking(int newStudentRanking) {
		studRanking = newStudentRanking;
	}

    @Override
	public int compareTo(Student student) {
		if(studRanking > student.studRanking) {
			return 1;
		}
		if(studRanking < student.studRanking){ 
			return -1;
		}
		return 0;
	}
	
	public void participateLearningProcess() {
		//do to something;
		knowledges +=10;
	}
	
	public int getKnowledges() {
		return knowledges;
	}
        
        @Override
        public String toString() {
            return super.toString();
        }
}
